A web cache saves resources of various types from one or more web servers and provides these resources to clients when a request for the resource is received. When a client sends a request for a specific resource, the request is received at the web cache and the cache checks whether it already has a copy of the requested resource stored in its storage and determines whether the copy of the resource has or has not expired. If the copy of the requested resource is available and has not expired, then the web cache sends a response to the requesting client with this stored copy of the resource, without communicating with the original server which holds this resource.
The advantages of caching are that by receiving the requested resource from the cache, the client gets a faster response to his request, network traffic is reduced, and the load on the web server supplying the resource is reduced.
Sometimes, however, a web server may provide an incorrect or incomplete copy of the resource to the web cache (i.e., “poisoned” the cache). Furthermore, in some embodiments a cache may be poisoned by a cache simply becoming defective, and thus the copies of the resources stored within the cache are also defective. Thereafter, clients who request the resource will get an incorrect or incomplete copy in response to their request. While the incorrect or incomplete resource copy may be quickly remedied on the web server, the web cache may still store the incorrect or incomplete copy of the resource. Since cached resources are associated with a time out period (e.g., expiration time), conventional remedies involve waiting until the time out period of the cached resource has expired and then the web cache will evacuate the previously stored copy of the resource by itself. However, until the time out period ends, users will be unable to obtain the desired resources from the web server, unless an administrator will manually clean up the cache, usually the entire cache (which would cause performance degradation, since “good” resources are deleted as well).